﻿using DL.Tools;
using UnityEngine;
using UnityEngine.AI;

namespace DL.AI.AIGOAP
{
    //代理核心 
    [RequireComponent(typeof(NavMeshAgent))]
    [RequireComponent(typeof(Animator))]
    public class GoapAgent : MonoBehaviour
    {
        [Header("传感器")] 
        //追踪
        [SerializeField] private Sensor m_ChaseSensor;
        //攻击
        [SerializeField] private Sensor m_AttackSensor;

        [Header("已知点")] 
        //休息点
        [SerializeField] private Transform m_ResetingPostion;
        [SerializeField] private Transform m_FoodShack;
        [SerializeField] private Transform m_DoorOnePostion;
        [SerializeField] private Transform m_DoorTwoPostion;

        private NavMeshAgent m_NavMeshAgent;
        private Animator m_Animator;
        private Rigidbody m_Rigidbody;

        [Header("状态")] 
        [SerializeField] public float Health = 100;
        [SerializeField] public float Stamina = 100;

        private GameObject m_target;
        private Vector3 m_Destination;

        private AgentGoal m_LastGoal;
        public AgentGoal m_CurrentGoal;
        public ActionPlan m_ActionPlan;
        public AgentAction m_CurrentAction;

    }

    public class ActionPlan
    {
    }
}